﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>IBM俱乐部留言板</title>
<link href="css/twoColFixLtHdr.css" rel="stylesheet" type="text/css" />
</head>
<body class="twoColFixLtHdr">
<div id="logo"></div>
<div id="navi"><table border="0" cellpadding="0" cellspacing="0"><tr>
<?php
require_once 'dbconn.php';
$sql="select * from module";
$result = $db->sql_query($sql);
$row = $db->sql_fetchrowset($result);
require_once 'resource_list.php';
foreach($row as $arr)
{
$modname=$arr['modname'];
$modhref=$arr['modhref'];
navi_list($modname,$modhref);
}
?>
</tr></table>
</div>
<div id="container">
<br /><h1>IBM俱乐部留言板</h1>
<hr size="5" color="#9D9D9D" />
<hr size="5" color="#9D9D9D" />
</div>
<div id="container">
<form method="post" name="msg">
<table width="960"  cellpadding="0" cellspacing="0" border="0" id="table_msgbard">
<tr><th height="40" style="text-align:center;">你好！欢迎进入IBM俱乐部留言板！&nbsp;&nbsp;
<input type="button" value="发表留言" name="newpost" onclick="window.location.reload('msg_newpost.php');" />&nbsp;&nbsp;
</th></tr>
<tr height="500" style="vertical-align:top;"><td>
<br /> 
<?php
require_once 'dbconn.php';
$sql="select * from post order by ptime desc";
$result = $db->sql_query($sql);
$row = $db->sql_fetchrowset($result);
require_once 'msg.php';
foreach($row as $arr)
{
$postid=$arr['postid'];
$pname=$arr['uname'];
$ptitle=$arr['ptitle'];
$msg=$arr['msg'];
$ptime=$arr['ptime'];
$replies=$arr['replies'];

msg_table($postid,$pname,$ptitle,$msg,$ptime,$replies);

$query="select * from reply where postid='$postid'";
$rresult = $db->sql_query($query);
if($rresult){
$rrow = $db->sql_fetchrowset($rresult);
require_once 'msg_reply.php';
foreach($rrow as $rarr)
{
$runame=$rarr['uname'];
$rmsg=$rarr['rmsg'];
$rtime=$rarr['rtime'];
reply_table($runame,$rmsg,$rtime);
}
}
}
?>

</td></tr></table></form>
</div>
<div id="footer">
<p>Copyright © 2010 IBM club,Shenzhen University, All Rights Reserved.</p></div>
</div>
</body>
</html>
